package com.atguigu.e_stream_limitandskip;

import java.util.Arrays;
import java.util.stream.IntStream;

public class Demo {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6,7,8,9,10};

        //进工厂
        IntStream stream = Arrays.stream(arr);

        //进车间
        //跳过前三个 , 留下后面的
        IntStream stream1 = stream.skip(3);
        //截取 -> 只要前五个
        IntStream stream2 = stream1.limit(5);


        //出工厂
        stream2.forEach(System.out::println);

    }
}
